﻿@model ContactUsModel
@using Grand.Web.Models.Common;
@{
    Layout = "_ColumnsOne";

    //title
    Html.AddTitleParts(T("PageTitle.ContactUs").Text);
}
<div class="page contact-page">
    <h1 class="generalTitle">@T("PageTitle.ContactUs")</h1>
    <div class="generalMarginSupporter text-xs-left">
        @await Component.InvokeAsync("TopicBlock", new { systemName = "ContactUs" })
        @await Component.InvokeAsync("Widget", new { widgetZone = "contactus_top" })
        @if (Model.SuccessfullySent)
        {
            <div class="result">
                <div class="result card bg-info p-3 text-white">@Model.Result</div>
            </div>
        }
        else
        {
            <form asp-route="ContactUs" method="post" id="contactus-form">
                <div asp-validation-summary="ModelOnly" class="message-error"></div>
                    <div class="form-fields">
                        <div class="form-group">
                            <label asp-for="FullName" class="col-form-label">@T("ContactUs.FullName"):</label>
                            <span class="required">*</span>
                            <input asp-for="FullName" placeholder="@T("ContactUs.FullName.Hint")" class="fullname form-control" />
                            <span asp-validation-for="FullName"></span>
                        </div>
                        <div class="form-group">
                            <label asp-for="Email" class="col-form-label">@T("ContactUs.Email"):</label>
                            <span class="required">*</span>
                            <input asp-for="Email" placeholder="@T("ContactUs.Email.Hint")" class="form-control email" />
                            <span asp-validation-for="Email"></span>
                        </div>
                        @if (Model.SubjectEnabled)
                        {
                            <div class="form-group">
                                <label asp-for="Subject" class="col-form-label">@T("ContactUs.Subject"):</label>
                                <span class="required">*</span>
                                <input asp-for="Subject" placeholder="@T("ContactUs.Subject.Hint")" class="form-control subject" />
                                <span asp-validation-for="Subject"></span>
                            </div>
                        }
                        <div class="form-group">
                            <label asp-for="Enquiry" class="col-form-label">@T("ContactUs.Enquiry"):</label>
                            <span class="required">*</span>
                            <textarea asp-for="Enquiry" placeholder="@T("ContactUs.Enquiry.Hint")" class="form-control enquiry"></textarea>
                            <span asp-validation-for="Enquiry"></span>
                        </div>
                        @if (Model.DisplayCaptcha)
                        {
                            <div class="captcha-box">
                                <captcha />
                            </div>
                        }
                    </div>
                    <partial name="_ContactAttributes" model="Model.ContactAttributes" />
                <div class="buttons mt-1 mb-1">
                    <input type="submit" name="send-email" class="btn btn-info contact-us-button" value="@T("ContactUs.Button")" />
                </div>
            </form>
        }
        @await Component.InvokeAsync("Widget", new { widgetZone = "contactus_bottom" })
    </div>
</div>
